using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Text;

namespace Data_Access_Tier
{
	public class HRM_TIMEKEEPER_FURLOUGHData : DatabaseObjectBase
	{
		public HRM_TIMEKEEPER_FURLOUGHData()
		{
			Initialize(true);
		}
		public HRM_TIMEKEEPER_FURLOUGHData(Boolean newConnection)
		{
			Initialize(newConnection);
		}

		public Int32 HRM_TIMEKEEPER_FURLOUGH_Insert(String EmployeeCode, Int32 YearOfWork, Int32 NumberOfYear, Int32 FurloughThisYear, Int32 M1, Int32 M2, Int32 M3, Int32 M4, Int32 M5, Int32 M6, Int32 M7, Int32 M8, Int32 M9, Int32 M10, Int32 M11, Int32 M12, Int32 TotalDay, Int32 RemainDay)
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.InsertCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_Insert");
				_dbadapter.InsertCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.InsertCommand.Connection = _dbconn;
				_trans = _dbconn.BeginTransaction();
				_dbadapter.InsertCommand.Transaction = _trans;
				_dbadapter.InsertCommand.Parameters.Clear();
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@EmployeeCode", SqlDbType.VarChar, 20));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@YearOfWork", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@NumberOfYear", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@FurloughThisYear", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M1", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M2", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M3", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M4", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M5", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M6", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M7", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M8", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M9", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M10", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M11", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@M12", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@TotalDay", SqlDbType.Int));
				_dbadapter.InsertCommand.Parameters.Add(new SqlParameter("@RemainDay", SqlDbType.Int));
				_dbadapter.InsertCommand.Prepare();
				SqlString EmployeeCodeSQL = EmployeeCode;
				_dbadapter.InsertCommand.Parameters["@EmployeeCode"].Value = EmployeeCodeSQL;
				SqlInt32 YearOfWorkSQL = YearOfWork;
				_dbadapter.InsertCommand.Parameters["@YearOfWork"].Value = YearOfWorkSQL;
				SqlInt32 NumberOfYearSQL = NumberOfYear;
				_dbadapter.InsertCommand.Parameters["@NumberOfYear"].Value = NumberOfYearSQL;
				SqlInt32 FurloughThisYearSQL = FurloughThisYear;
				_dbadapter.InsertCommand.Parameters["@FurloughThisYear"].Value = FurloughThisYearSQL;
				SqlInt32 M1SQL = M1;
				_dbadapter.InsertCommand.Parameters["@M1"].Value = M1SQL;
				SqlInt32 M2SQL = M2;
				_dbadapter.InsertCommand.Parameters["@M2"].Value = M2SQL;
				SqlInt32 M3SQL = M3;
				_dbadapter.InsertCommand.Parameters["@M3"].Value = M3SQL;
				SqlInt32 M4SQL = M4;
				_dbadapter.InsertCommand.Parameters["@M4"].Value = M4SQL;
				SqlInt32 M5SQL = M5;
				_dbadapter.InsertCommand.Parameters["@M5"].Value = M5SQL;
				SqlInt32 M6SQL = M6;
				_dbadapter.InsertCommand.Parameters["@M6"].Value = M6SQL;
				SqlInt32 M7SQL = M7;
				_dbadapter.InsertCommand.Parameters["@M7"].Value = M7SQL;
				SqlInt32 M8SQL = M8;
				_dbadapter.InsertCommand.Parameters["@M8"].Value = M8SQL;
				SqlInt32 M9SQL = M9;
				_dbadapter.InsertCommand.Parameters["@M9"].Value = M9SQL;
				SqlInt32 M10SQL = M10;
				_dbadapter.InsertCommand.Parameters["@M10"].Value = M10SQL;
				SqlInt32 M11SQL = M11;
				_dbadapter.InsertCommand.Parameters["@M11"].Value = M11SQL;
				SqlInt32 M12SQL = M12;
				_dbadapter.InsertCommand.Parameters["@M12"].Value = M12SQL;
				SqlInt32 TotalDaySQL = TotalDay;
				_dbadapter.InsertCommand.Parameters["@TotalDay"].Value = TotalDaySQL;
				SqlInt32 RemainDaySQL = RemainDay;
				_dbadapter.InsertCommand.Parameters["@RemainDay"].Value = RemainDaySQL;
				Int32 returnvalue = Convert.ToInt32(_dbadapter.InsertCommand.ExecuteScalar());

				_trans.Commit();
				return returnvalue;
			}
			catch (SqlException e)
			{
				try
				{
					_trans.Rollback();
				}
				catch (SqlException ex)
				{
					throw new Exception("SQL Rollback Error: HRM_TIMEKEEPER_FURLOUGH_Insert: " + ex.Message, ex);
				}
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_Insert: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.InsertCommand != null)
					_dbadapter.InsertCommand.Dispose();
				CloseConnection();
			}
		}
		public Int32 HRM_TIMEKEEPER_FURLOUGH_Update(String EmployeeCode, Int32 YearOfWork, Int32 NumberOfYear, Int32 FurloughThisYear, Int32 M1, Int32 M2, Int32 M3, Int32 M4, Int32 M5, Int32 M6, Int32 M7, Int32 M8, Int32 M9, Int32 M10, Int32 M11, Int32 M12, Int32 TotalDay, Int32 RemainDay)
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.UpdateCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_Update");
				_dbadapter.UpdateCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.UpdateCommand.Connection = _dbconn;

				_trans = _dbconn.BeginTransaction();
				_dbadapter.UpdateCommand.Transaction = _trans;

				_dbadapter.UpdateCommand.Parameters.Clear();
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@EmployeeCode", SqlDbType.VarChar, 20));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@YearOfWork", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@NumberOfYear", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@FurloughThisYear", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M1", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M2", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M3", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M4", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M5", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M6", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M7", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M8", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M9", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M10", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M11", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M12", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@TotalDay", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@RemainDay", SqlDbType.Int));
				_dbadapter.UpdateCommand.Prepare();
				SqlString EmployeeCodeSQL = EmployeeCode;
				_dbadapter.UpdateCommand.Parameters["@EmployeeCode"].Value = EmployeeCodeSQL;
				SqlInt32 YearOfWorkSQL = YearOfWork;
				_dbadapter.UpdateCommand.Parameters["@YearOfWork"].Value = YearOfWorkSQL;
				SqlInt32 NumberOfYearSQL = NumberOfYear;
				_dbadapter.UpdateCommand.Parameters["@NumberOfYear"].Value = NumberOfYearSQL;
				SqlInt32 FurloughThisYearSQL = FurloughThisYear;
				_dbadapter.UpdateCommand.Parameters["@FurloughThisYear"].Value = FurloughThisYearSQL;
				SqlInt32 M1SQL = M1;
				_dbadapter.UpdateCommand.Parameters["@M1"].Value = M1SQL;
				SqlInt32 M2SQL = M2;
				_dbadapter.UpdateCommand.Parameters["@M2"].Value = M2SQL;
				SqlInt32 M3SQL = M3;
				_dbadapter.UpdateCommand.Parameters["@M3"].Value = M3SQL;
				SqlInt32 M4SQL = M4;
				_dbadapter.UpdateCommand.Parameters["@M4"].Value = M4SQL;
				SqlInt32 M5SQL = M5;
				_dbadapter.UpdateCommand.Parameters["@M5"].Value = M5SQL;
				SqlInt32 M6SQL = M6;
				_dbadapter.UpdateCommand.Parameters["@M6"].Value = M6SQL;
				SqlInt32 M7SQL = M7;
				_dbadapter.UpdateCommand.Parameters["@M7"].Value = M7SQL;
				SqlInt32 M8SQL = M8;
				_dbadapter.UpdateCommand.Parameters["@M8"].Value = M8SQL;
				SqlInt32 M9SQL = M9;
				_dbadapter.UpdateCommand.Parameters["@M9"].Value = M9SQL;
				SqlInt32 M10SQL = M10;
				_dbadapter.UpdateCommand.Parameters["@M10"].Value = M10SQL;
				SqlInt32 M11SQL = M11;
				_dbadapter.UpdateCommand.Parameters["@M11"].Value = M11SQL;
				SqlInt32 M12SQL = M12;
				_dbadapter.UpdateCommand.Parameters["@M12"].Value = M12SQL;
				SqlInt32 TotalDaySQL = TotalDay;
				_dbadapter.UpdateCommand.Parameters["@TotalDay"].Value = TotalDaySQL;
				SqlInt32 RemainDaySQL = RemainDay;
				_dbadapter.UpdateCommand.Parameters["@RemainDay"].Value = RemainDaySQL;
				Int32 returnvalue = Convert.ToInt32(_dbadapter.UpdateCommand.ExecuteScalar());

				_trans.Commit();
				return returnvalue;
			}
			catch (SqlException e)
			{
				try
				{
					_trans.Rollback();
				}
				catch (SqlException ex)
				{
					throw new Exception("SQL Rollback Error: HRM_TIMEKEEPER_FURLOUGH_Update: " + ex.Message, ex);
				}
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_Update: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.UpdateCommand != null)
					_dbadapter.UpdateCommand.Dispose();
				CloseConnection();
			}
		}
		public Int32 HRM_TIMEKEEPER_FURLOUGH_Disable(String EmployeeCode, ref Boolean Enabled)
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.UpdateCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_Disable");
				_dbadapter.UpdateCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.UpdateCommand.Connection = _dbconn;

				_trans = _dbconn.BeginTransaction();
				_dbadapter.UpdateCommand.Transaction = _trans;

				_dbadapter.UpdateCommand.Parameters.Clear();
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@EmployeeCode", SqlDbType.VarChar, 20));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@enabled", SqlDbType.Bit));
				_dbadapter.UpdateCommand.Prepare();
				SqlString EmployeeCodeSQL = EmployeeCode;
				_dbadapter.UpdateCommand.Parameters["@EmployeeCode"].Value = EmployeeCodeSQL;
				_dbadapter.UpdateCommand.Parameters["@enabled"].Direction = ParameterDirection.Output;
				Int32 returnvalue = Convert.ToInt32(_dbadapter.UpdateCommand.ExecuteScalar());

				_trans.Commit();
				return returnvalue;
			}
			catch (SqlException e)
			{
				try
				{
					_trans.Rollback();
				}
				catch (SqlException ex)
				{
					throw new Exception("SQL Rollback Error: HRM_TIMEKEEPER_FURLOUGH_Disable: " + ex.Message, ex);
				}
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_Disable: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.UpdateCommand != null)
					_dbadapter.UpdateCommand.Dispose();
				CloseConnection();
			}
		}
		public Int32 HRM_TIMEKEEPER_FURLOUGH_Delete(String EmployeeCode)
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.DeleteCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_Delete");
				_dbadapter.DeleteCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.DeleteCommand.Connection = _dbconn;

				_trans = _dbconn.BeginTransaction();
				_dbadapter.DeleteCommand.Transaction = _trans;

				_dbadapter.DeleteCommand.Parameters.Clear();
				_dbadapter.DeleteCommand.Parameters.Add(new SqlParameter("@EmployeeCode", SqlDbType.VarChar, 20));
				_dbadapter.DeleteCommand.Prepare();
				SqlString EmployeeCodeSQL = EmployeeCode;
				_dbadapter.DeleteCommand.Parameters["@EmployeeCode"].Value = EmployeeCodeSQL;
				Int32 returnvalue = Convert.ToInt32(_dbadapter.DeleteCommand.ExecuteScalar());

				_trans.Commit();
				return returnvalue;
			}
			catch (SqlException e)
			{
				try
				{
					_trans.Rollback();
				}
				catch (SqlException ex)
				{
					throw new Exception("SQL Rollback Error: HRM_TIMEKEEPER_FURLOUGH_Delete: " + ex.Message, ex);
				}
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_Delete: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.DeleteCommand != null)
					_dbadapter.DeleteCommand.Dispose();
				CloseConnection();
			}
		}
		public Int32 HRM_TIMEKEEPER_FURLOUGH_Save(String EmployeeCode, Int32 YearOfWork, Int32 NumberOfYear, Int32 FurloughThisYear, Int32 M1, Int32 M2, Int32 M3, Int32 M4, Int32 M5, Int32 M6, Int32 M7, Int32 M8, Int32 M9, Int32 M10, Int32 M11, Int32 M12, Int32 TotalDay, Int32 RemainDay)
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.UpdateCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_Save");
				_dbadapter.UpdateCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.UpdateCommand.Connection = _dbconn;

				_trans = _dbconn.BeginTransaction();
				_dbadapter.UpdateCommand.Transaction = _trans;

				_dbadapter.UpdateCommand.Parameters.Clear();
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@EmployeeCode", SqlDbType.VarChar, 20));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@YearOfWork", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@NumberOfYear", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@FurloughThisYear", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M1", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M2", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M3", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M4", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M5", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M6", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M7", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M8", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M9", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M10", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M11", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@M12", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@TotalDay", SqlDbType.Int));
				_dbadapter.UpdateCommand.Parameters.Add(new SqlParameter("@RemainDay", SqlDbType.Int));
				_dbadapter.UpdateCommand.Prepare();
				SqlString EmployeeCodeSQL = EmployeeCode;
				_dbadapter.UpdateCommand.Parameters["@EmployeeCode"].Value = EmployeeCodeSQL;
				SqlInt32 YearOfWorkSQL = YearOfWork;
				_dbadapter.UpdateCommand.Parameters["@YearOfWork"].Value = YearOfWorkSQL;
				SqlInt32 NumberOfYearSQL = NumberOfYear;
				_dbadapter.UpdateCommand.Parameters["@NumberOfYear"].Value = NumberOfYearSQL;
				SqlInt32 FurloughThisYearSQL = FurloughThisYear;
				_dbadapter.UpdateCommand.Parameters["@FurloughThisYear"].Value = FurloughThisYearSQL;
				SqlInt32 M1SQL = M1;
				_dbadapter.UpdateCommand.Parameters["@M1"].Value = M1SQL;
				SqlInt32 M2SQL = M2;
				_dbadapter.UpdateCommand.Parameters["@M2"].Value = M2SQL;
				SqlInt32 M3SQL = M3;
				_dbadapter.UpdateCommand.Parameters["@M3"].Value = M3SQL;
				SqlInt32 M4SQL = M4;
				_dbadapter.UpdateCommand.Parameters["@M4"].Value = M4SQL;
				SqlInt32 M5SQL = M5;
				_dbadapter.UpdateCommand.Parameters["@M5"].Value = M5SQL;
				SqlInt32 M6SQL = M6;
				_dbadapter.UpdateCommand.Parameters["@M6"].Value = M6SQL;
				SqlInt32 M7SQL = M7;
				_dbadapter.UpdateCommand.Parameters["@M7"].Value = M7SQL;
				SqlInt32 M8SQL = M8;
				_dbadapter.UpdateCommand.Parameters["@M8"].Value = M8SQL;
				SqlInt32 M9SQL = M9;
				_dbadapter.UpdateCommand.Parameters["@M9"].Value = M9SQL;
				SqlInt32 M10SQL = M10;
				_dbadapter.UpdateCommand.Parameters["@M10"].Value = M10SQL;
				SqlInt32 M11SQL = M11;
				_dbadapter.UpdateCommand.Parameters["@M11"].Value = M11SQL;
				SqlInt32 M12SQL = M12;
				_dbadapter.UpdateCommand.Parameters["@M12"].Value = M12SQL;
				SqlInt32 TotalDaySQL = TotalDay;
				_dbadapter.UpdateCommand.Parameters["@TotalDay"].Value = TotalDaySQL;
				SqlInt32 RemainDaySQL = RemainDay;
				_dbadapter.UpdateCommand.Parameters["@RemainDay"].Value = RemainDaySQL;
				Int32 returnvalue = Convert.ToInt32(_dbadapter.UpdateCommand.ExecuteScalar());

				_trans.Commit();
				return returnvalue;
			}
			catch (SqlException e)
			{
				try
				{
					_trans.Rollback();
				}
				catch (SqlException ex)
				{
					throw new Exception("SQL Rollback Error: HRM_TIMEKEEPER_FURLOUGH_Save: " + ex.Message, ex);
				}
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_Save: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.UpdateCommand != null)
					_dbadapter.UpdateCommand.Dispose();
				CloseConnection();
			}
		}
		public DataSet HRM_TIMEKEEPER_FURLOUGH_GetList()
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.SelectCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_GetList");
				_dbadapter.SelectCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.SelectCommand.Connection = _dbconn;
				_dbadapter.SelectCommand.Parameters.Clear();
				_dbadapter.SelectCommand.Prepare();
				_dbadapter.Fill(_data);

				return _data;
			}
			catch (SqlException e)
			{
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_GetList: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.SelectCommand != null)
					_dbadapter.SelectCommand.Dispose();
				CloseConnection();
			}
		}
		public DataSet HRM_TIMEKEEPER_FURLOUGH_Get(String EmployeeCode)
		{
			try
			{
				if (_dbconn.State != ConnectionState.Open)
					_dbconn.Open();
				_dbadapter.SelectCommand = new SqlCommand("HRM_TIMEKEEPER_FURLOUGH_Get");
				_dbadapter.SelectCommand.CommandType = CommandType.StoredProcedure;
				_dbadapter.SelectCommand.Connection = _dbconn;
				_dbadapter.SelectCommand.Parameters.Clear();
				_dbadapter.SelectCommand.Parameters.Add(new SqlParameter("@EmployeeCode", SqlDbType.VarChar, 20));
				_dbadapter.SelectCommand.Prepare();
				SqlString EmployeeCodeSQL = EmployeeCode;
				_dbadapter.SelectCommand.Parameters["@EmployeeCode"].Value = EmployeeCodeSQL;
				_dbadapter.Fill(_data);

				return _data;
			}
			catch (SqlException e)
			{
				throw new Exception("SQL Error: HRM_TIMEKEEPER_FURLOUGH_Get: " + e.Message, e);
			}
			finally
			{
				if (_dbadapter.SelectCommand != null)
					_dbadapter.SelectCommand.Dispose();
				CloseConnection();
			}
		}
	}
}
